The number of distinct data items used in a condition (IF
, EVALUATE
, …) should not exceed a defined threshold.
Noncompliant code example
With the default default threshold of 3:
IF WS-FOO(1) = 1 OR *> 1st data item
WS-FOO(2) = 2 OR
WS-FOO(3) = 3 OR
WS-BAR = 4 OR *> 2nd data item
WS-BAZ = 5 OR *> 3rd data item
WS-QUX = 42 *> Noncompliant; 4th data item
END-IF.
Compliant solution
IF WS-FOO(1) = 1 OR
WS-FOO(2) = 2 OR
WS-FOO(3) = 3 OR
WS-BAR = 4 OR
WS-BAZ = 42
END-IF.